<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>浅评程序员用字体 | 素墨文胤</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="记得有一篇文章说，程序员用的字体要数字0和字母oO、数字1和字母il能非常容易分开才好。文章也推荐了好多种字体，国内用的大多是3种，Fixedsys、consolas、Sans Mono，自从文泉驿腾空出世后，又有了2种等宽字体，文泉驿等宽正黑、文泉驿等宽微米黑。我做了5种字体下6个字符的对比图（外加非等宽的微米黑）：他们从左到右依次是Fixedsys、consolas、Sans Mono、文泉驿">
<meta property="og:type" content="article">
<meta property="og:title" content="浅评程序员用字体">
<meta property="og:url" content="http://godera.org/2015/03/16/浅评程序员用字体/index.html">
<meta property="og:site_name" content="素墨文胤">
<meta property="og:description" content="记得有一篇文章说，程序员用的字体要数字0和字母oO、数字1和字母il能非常容易分开才好。文章也推荐了好多种字体，国内用的大多是3种，Fixedsys、consolas、Sans Mono，自从文泉驿腾空出世后，又有了2种等宽字体，文泉驿等宽正黑、文泉驿等宽微米黑。我做了5种字体下6个字符的对比图（外加非等宽的微米黑）：他们从左到右依次是Fixedsys、consolas、Sans Mono、文泉驿">
<meta property="og:image" content="http://godera.org/images/chengxuyuan6zitibijiao.png">
<meta property="og:image" content="http://godera.org/images/Fixed007Normal.png">
<meta property="og:image" content="http://godera.org/images/Fixed007Bold.png">
<meta property="og:updated_time" content="2016-03-30T07:36:39.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="浅评程序员用字体">
<meta name="twitter:description" content="记得有一篇文章说，程序员用的字体要数字0和字母oO、数字1和字母il能非常容易分开才好。文章也推荐了好多种字体，国内用的大多是3种，Fixedsys、consolas、Sans Mono，自从文泉驿腾空出世后，又有了2种等宽字体，文泉驿等宽正黑、文泉驿等宽微米黑。我做了5种字体下6个字符的对比图（外加非等宽的微米黑）：他们从左到右依次是Fixedsys、consolas、Sans Mono、文泉驿">
<meta name="twitter:image" content="http://godera.org/images/chengxuyuan6zitibijiao.png">
  
  
    <link rel="icon" href="/favicon.png">
  

  <link rel="stylesheet" href="/css/style.css">
  
    <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  
  
    <link rel="stylesheet" href="/scrollLoading/style.css">
  
  


  

  
    <link href='//fonts.useso.com/css?family=Titillium+Web:300,400,600' rel='stylesheet' type='text/css'>
    <link href="//fonts.useso.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css">
</head>

<body>
  <div id="wrap">
    <header id="header">
  <div id="header-outer" class="outer">
    <div class="container">
      <div class="container-inner">
        <div id="header-title">
          <h1 class="logo-wrap">
            <a href="/" class="logo"></a>
          </h1>
          
            <h2 class="subtitle-wrap">
              <p class="subtitle">一日心静一日仙，不以神力乱人间。</p>
            </h2>
          
        </div>
        <div id="header-inner" class="nav-container">
          <a id="main-nav-toggle" class="nav-icon fa fa-bars"></a>
          <div class="nav-container-inner">
            <ul id="main-nav">
              
                <li class="main-nav-list-item" ><a class="main-nav-list-link" href="/">Home</a></li>
              
                    <ul class="main-nav-list"><li class="main-nav-list-item"><a class="main-nav-list-link" href="/categories/JS/">JS</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/categories/Unix-Linux/">Unix_Linux</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/categories/iOS/">iOS</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/categories/哲学辨思/">哲学辨思</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/categories/数据库/">数据库</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/categories/文字文化/">文字文化</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/categories/生活感悟/">生活感悟</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/categories/随心随性/">随心随性</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/categories/默认标签/">默认标签</a></li></ul>
                  
                <li class="main-nav-list-item" ><a class="main-nav-list-link" href="/about/index.html">About</a></li>
              
            </ul>
            <nav id="sub-nav">
              <div id="search-form-wrap">
                
                  <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><input type="hidden" name="sitesearch" value="http://godera.org"></form>
                
              </div>
            </nav>
          </div>
        </div>
      </div>
    </div>
  </div>
</header>
    <div class="container">
      <div class="main-body container-inner">
        <div class="main-body-inner">
          <section id="main">
            <div class="main-body-header">

              <h1 class="header"><a class="page-title-link" href="/categories/Unix-Linux/">Unix_Linux</a></h1>
            </div>
            <div class="main-body-content">
              
  <article id="post-浅评程序员用字体" class="article article-single article-type-post" itemscope itemprop="blogPost">
    <div class="article-inner">
      <!--  -->
      
        <header class="article-header">
          
  
    <h1 class="article-title" itemprop="name">
      浅评程序员用字体
    </h1>
  

        </header>
      
      <p class="article-byline">
        <a href="/2015/03/16/浅评程序员用字体/" class="article-date">
  <time datetime="2015-03-16T08:58:19.000Z" itemprop="datePublished">2015-03-16</time>
</a>
      </p>
      <div class="article-entry" itemprop="articleBody">
        <p>记得有一篇文章说，程序员用的字体要数字0和字母oO、数字1和字母il能非常容易分开才好。<br>文章也推荐了好多种字体，国内用的大多是3种，Fixedsys、consolas、Sans Mono，<br>自从文泉驿腾空出世后，又有了2种等宽字体，文泉驿等宽正黑、文泉驿等宽微米黑。<br>我做了5种字体下6个字符的对比图（外加非等宽的微米黑）：<br><img src="/images/chengxuyuan6zitibijiao.png" alt="6种字体"><br>他们从左到右依次是Fixedsys、consolas、Sans Mono、文泉驿等宽正黑、文泉驿等宽微米黑、文泉驿微米黑（非等宽）。<br>我觉得：<a id="more"></a><br>数字0最好是文泉驿等宽正黑的，那样与字母大O的区别才大；<br>字母小o都行；<br>字母大O能像文泉驿微米黑（非等宽）的那个就好了，左右宽度比较大才能让人不联想到数字0；<br>数字1的形状文泉驿的都行，特点是上面的勾是斜着朝下的，下面没小横线，这样一眼就知道是数字1；<br>字母小i除了最后一个容易在粗体的情况下误认外其他的都很好；<br>字母小l那就数sans mono和文泉驿等宽正黑的设计为最好了。<br>综上所述：<br>Fixedsys与理想差4个字母；<br>consolas与理想差3个字母；<br>Sans Mono与理想差3个字母；<br>文泉驿等宽正黑与理想差1个字母；<br>文泉驿等宽微米黑与理想差3个字母；<br>文泉驿微米黑（非等宽）与理想差3个字母。<br>看来差的最少的是文泉驿等宽正黑，就是6个图中底下有条横线的那个，如果能把字母大写O换成文泉驿微米黑的那个就完美了；所以说，目前对程序员最友好的字体是文泉驿等宽正黑，并且他在12号时还是双等宽字体，即不光英英等宽，还2个英文字母和1个汉字等宽。<br>［后注］文泉驿微米黑（非等宽）的那个大O似乎占了一个汉字的地方，也就是说文泉驿等宽正黑算是完美的了。不过ttf字体有时候模糊，我自己根据文泉驿的Unibit（含Fixedsys字体）改了个细笔画的Fixed字体，非常犀利和清晰，命名作Fixed007，简直是编程和工作的利器，并且与文泉驿中文字体配合的天衣无缝。贴个Fixed007的图吧：<br><img src="/images/Fixed007Normal.png" alt="Fixed007Normal"><br><img src="/images/Fixed007Bold.png" alt="Fixed007Bold"><br>我又做了Fixed005、Fixed004，结果就是感觉不如007，真奇怪。做007的那天刚下过雨，晚上起来后对字体相当有感觉，今天做起来都没感觉，莫衷一是，然后我才知道好东西原来是天做的，原非人为。呵呵。<br>今天在网上突然看见一个字体跟我弄的那个Fixed007风格很近，可惜只有13、14号的，还是非等宽的，地址是：<a href="http://bbs.dospy.com/thread-3867377-1-1.html" target="_blank" rel="external">http://bbs.dospy.com/thread-3867377-1-1.html</a></p>
<p>【注】Fixed007字体的下载地址是 <a href="http://wenq.org/forum/viewtopic.php?f=7&amp;t=971" target="_blank" rel="external">http://wenq.org/forum/viewtopic.php?f=7&amp;t=971</a></p>
<p>顺便提一下2个字体修改软件，他们是xmbdfed(也就是gbdfed)和fontforge。</p>
<p>【mac下的好字体太多了，比如Menlo，Monaco，不过我最喜欢的却是PT Mono】</p>

      </div>
      <footer class="article-footer">
        <a data-url="http://godera.org/2015/03/16/浅评程序员用字体/" data-id="ciw7o5qk000663refwgj7a6vl" class="article-share-link"><i class="fa fa-share"></i>Share</a>
        
        
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Unix-Linux/">Unix_Linux</a></li></ul>

      </footer>
    </div>
  </article>
  
  


<!--高速版-->
<div id="SOHUCS"></div>
<script charset="utf-8" type="text/javascript" src="http://changyan.sohu.com/upload/changyan.js" ></script>
<script type="text/javascript">
    window.changyan.api.config({
        appid: 'cys5Qvajj',
        conf: 'prod_62197afb84b42bd16c642feedaaef9f1'
    });
</script>   

            </div>
          </section>
          <aside id="sidebar">
  <a class="sidebar-toggle" title="Expand Sidebar"><i class="toggle icon"></i></a>
  <div class="sidebar-top">
    <p>follow:</p>
    <ul class="social-links">
      
        <li><a class="social-tooltip" title="github" href="https://github.com/godera" target="_blank"><i class="icon fa fa-github"></i></a></li>
      
    </ul>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2015/03/16/【留档】左人水的皓首穷经博客网址/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">newer</strong>
      <p class="article-nav-title">
        
          【留档】左人水的皓首穷经博客网址
        
      </p>
      <i class="icon fa fa-chevron-right" id="icon-chevron-right"></i>
    </a>
  
  
    <a href="/2015/03/16/【转帖】-国学宗教-释迦牟尼是中国人/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">older</strong>
      <p class="article-nav-title">【转帖】[国学宗教]释迦牟尼是中国人</p>
      <i class="icon fa fa-chevron-left" id="icon-chevron-left"></i>
    </a>
  
</nav>

  
  <div class="widgets-container">
    
      
  <div class="widget-wrap">
    <h3 class="widget-title">recents</h3>
    <div class="widget">
      <ul id="recent-post" class="">
        
          <li>
            
            <div class="item-thumbnail">
              
<a href="/2016/11/30/Markdown-技巧汇总（持续帖）/" class="thumbnail">
  
    <span class="thumbnail-image thumbnail-none"></span>
  
</a>

            </div>
            
            <div class="item-inner">
              <p class="item-category"><a class="article-category-link" href="/categories/iOS/">iOS</a></p>
              <p class="item-title"><a href="/2016/11/30/Markdown-技巧汇总（持续帖）/" class="title">Markdown 技巧汇总（持续帖）</a></p>
              <p class="item-date"><time datetime="2016-11-30T05:10:18.000Z" itemprop="datePublished">2016-11-30</time></p>
            </div>
          </li>
        
          <li>
            
            <div class="item-thumbnail">
              
<a href="/2016/11/27/CocoaPods-指南/" class="thumbnail">
  
    <span class="thumbnail-image thumbnail-none"></span>
  
</a>

            </div>
            
            <div class="item-inner">
              <p class="item-category"><a class="article-category-link" href="/categories/iOS/">iOS</a></p>
              <p class="item-title"><a href="/2016/11/27/CocoaPods-指南/" class="title">CocoaPods 指南</a></p>
              <p class="item-date"><time datetime="2016-11-27T11:03:26.000Z" itemprop="datePublished">2016-11-27</time></p>
            </div>
          </li>
        
          <li>
            
            <div class="item-thumbnail">
              
<a href="/2016/04/16/OC-和-Swift-的混用方法/" class="thumbnail">
  
    <span class="thumbnail-image thumbnail-none"></span>
  
</a>

            </div>
            
            <div class="item-inner">
              <p class="item-category"><a class="article-category-link" href="/categories/iOS/">iOS</a></p>
              <p class="item-title"><a href="/2016/04/16/OC-和-Swift-的混用方法/" class="title">OC 和 Swift 的混用方法</a></p>
              <p class="item-date"><time datetime="2016-04-16T11:11:42.000Z" itemprop="datePublished">2016-04-16</time></p>
            </div>
          </li>
        
          <li>
            
            <div class="item-thumbnail">
              
<a href="/2016/04/11/ReactiveCocoa-简单总结/" class="thumbnail">
  
    <span class="thumbnail-image thumbnail-none"></span>
  
</a>

            </div>
            
            <div class="item-inner">
              <p class="item-category"><a class="article-category-link" href="/categories/iOS/">iOS</a></p>
              <p class="item-title"><a href="/2016/04/11/ReactiveCocoa-简单总结/" class="title">ReactiveCocoa 简单总结</a></p>
              <p class="item-date"><time datetime="2016-04-11T03:00:29.000Z" itemprop="datePublished">2016-04-11</time></p>
            </div>
          </li>
        
          <li>
            
            <div class="item-thumbnail">
              
<a href="/2016/04/09/从汉语字面理解-观察者模式-和-订阅者模式-的区别/" class="thumbnail">
  
    <span class="thumbnail-image thumbnail-none"></span>
  
</a>

            </div>
            
            <div class="item-inner">
              <p class="item-category"><a class="article-category-link" href="/categories/Unix-Linux/">Unix_Linux</a></p>
              <p class="item-title"><a href="/2016/04/09/从汉语字面理解-观察者模式-和-订阅者模式-的区别/" class="title">从汉语字面理解 观察者模式 和 订阅者模式 的区别</a></p>
              <p class="item-date"><time datetime="2016-04-09T10:19:20.000Z" itemprop="datePublished">2016-04-09</time></p>
            </div>
          </li>
        
      </ul>
    </div>
  </div>

    
      
  <div class="widget-wrap widget-list">
    <h3 class="widget-title">archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/11/">November 2016</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/04/">April 2016</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">March 2016</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/02/">February 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">January 2016</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">December 2015</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">November 2015</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/10/">October 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/09/">September 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/08/">August 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/06/">June 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/05/">May 2015</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/04/">April 2015</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/03/">March 2015</a><span class="archive-list-count">36</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/02/">February 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/01/">January 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/10/">October 2014</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/06/">June 2012</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2011/10/">October 2011</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2010/06/">June 2010</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2008/08/">August 2008</a><span class="archive-list-count">1</span></li></ul>
    </div>
  </div>


    
      
  <div class="widget-wrap widget-float">
    <h3 class="widget-title">tag cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/JS/" style="font-size: 10px;">JS</a> <a href="/tags/Unix-Linux/" style="font-size: 14px;">Unix_Linux</a> <a href="/tags/iOS/" style="font-size: 20px;">iOS</a> <a href="/tags/哲学辨思/" style="font-size: 16px;">哲学辨思</a> <a href="/tags/数据库/" style="font-size: 10px;">数据库</a> <a href="/tags/文字文化/" style="font-size: 18px;">文字文化</a> <a href="/tags/生活感悟/" style="font-size: 14px;">生活感悟</a> <a href="/tags/随心随性/" style="font-size: 12px;">随心随性</a> <a href="/tags/默认标签/" style="font-size: 10px;">默认标签</a>
    </div>
  </div>


    
      
  <div class="widget-wrap widget-list">
    <h3 class="widget-title">links</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="http://hexo.io">Hexo</a>
          </li>
        
      </ul>
    </div>
  </div>


    
  </div>
</aside>
        </div>
      </div>
    </div>
    <footer id="footer">
  
  <div class="container">
    <div class="container-inner">
      <a id="back-to-top" href="javascript:;"><i class="icon fa fa-angle-up"></i></a>
      <div class="credit">
        <h1 class="logo-wrap">
          <a href="/" class="logo"></a>
        </h1>
        <p>&copy; 2016 梁逊</p>
        <p>Powered by <a href="//hexo.io/" target="_blank">Hexo</a>. Theme by <a href="//github.com/ppoffice" target="_blank">PPOffice</a></p>
      </div>
    </div>
  </div>
</footer>
    


  <script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>



  <script src="/fancybox/jquery.fancybox.pack.js"></script>



  <script src="/scrollLoading/jquery.scrollLoading.js"></script>
  <script src="/scrollLoading/main.js"></script>




<script src="/js/html-patch.js"></script>
<script src="/js/script.js"></script>

  </div>
</body>
</html>
